/*
 * @Author: z9527
 * @Date: 2022-02-23 17:39:27
 * @LastEditTime: 2022-03-10 14:34:13
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \mallAdmin\src\app\main\config\config-mapping-list\config-mapping-list.service.ts
 */
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';

@Injectable({
  providedIn: 'root'
})
export class ConfigMappingListService {

  services = {
    queryMappingUrl: '/mapping/list', // 查询映射
    saveMappingUrl: '/mapping/save', // 添加映射
    updateMappingUrl: '/mapping/update' // 修改映射
  }

  constructor(public httpClient: HttpClient) { }
  
  // 查询映射
  queryMappingList(params: any) {
    return this.httpClient.post(this.services.queryMappingUrl, params).toPromise();
  }

  // 添加映射
  saveMappingItem(params: any) {
    return this.httpClient.post(this.services.saveMappingUrl, params).toPromise();
  }

  // 修改映射
  updateMappingItem(params: any) {
    return this.httpClient.post(this.services.updateMappingUrl, params).toPromise();
  }
}
